<?php

class socialController extends baseController {
	
	public function index() {
		
		$this->registry->template->message = "Social Networking with Kill Ten Minutes";
		
		$this->registry->template->facebook = $this->main_social_facebook();
		
		$this->registry->template->twitter = $this->main_social_twitter();
		
		$this->registry->template->show('index');
		
	}
	
	public function connect_with_facebook() {
			
			$appapikey = 'f41ab27e0079db2752805afab736bc8a';
			$appsecret = '77a2b44cb59f54fbb47dea5f89cfc2ae';
			$facebook = new Facebook($appapikey, $appsecret);
			$user_id = $facebook->require_login();
			
			$this->registry->template->header = "Connecting with Facebook";
			
			$this->registry->template->show('facebook');			
		
	}
	
	public function main_social_facebook() {
		
		$html = "<a href=\"/social/connect_with_facebook\"><fb:login-button length='long'></fb:login-button></a>";
		
		return $html;
		
	}
	
	public function main_social_twitter() {
		
		$html = "";
		
		return $html;
		
	}
	
}

?>